package com.flute.tools.util.performance;

public class TimeRecord {
	private long total;
	private long count;

	public void addTime(long time) {
		this.total = this.total + time;
		this.count++;
	}

	public long getTotal() {
		return total;
	}

	public void setTotal(long total) {
		this.total = total;
	}

	public long getCount() {
		return count;
	}

	public void setCount(long count) {
		this.count = count;
	}

	public long getAverage() {
		if (count == 0) {
			return -1;
		}
		return total / count;
	}
}
